package com.actionpals.collections
{
	/**
	 * The IIterator interface provides the methods required for all concrete iterators to implement.
	 * 
	 * @author Mark Walters
	 */
	public interface IIterator
	{
		/**
		 *The current cursor position.
		 */
		function get cursor():uint;
		
		/**
		 * private
		 */		
		function set cursor( value:uint ):void;
		
		/**
		 * Checks to see if there is a previous item in the collection.
		 * 
		 * @return The collection has another item or not.
		 */
		function hasPrevious():Boolean;
		
		/**
		 * Checks to see if there is a next item in the collection.
		 * 
		 * @return The collection has another item or not.
		 */
		function hasNext():Boolean;
		
		/**
		 * Moves the cursor to the previous item in the collection and returns that item.
		 * 
		 * @return The previous item in the collection.
		 */
		function previous():Object;
		
		/**
		 * Moves the cursor to the next item in the collection and returns that item.
		 * 
		 * @return The next item in the collection.
		 */
		function next():Object;
		
		/**
		 * Resets the cursor back to the first item in the collection.
		 */
		function reset():void;
	}
}